package com.dlc.yunguang.adapter;

import com.dlc.commonlibrary.adapter.BaseRecyclerAdapter;
import com.dlc.yunguang.net.bean.ProductBean;
import com.dlc.yunguang.R;

/**
 * Created by John on 2017/7/20.
 */

public class CountingProductAdapter<T extends ProductBean.DataBean> extends BaseRecyclerAdapter<T> {

    @Override
    public int getItemLayoutId(int viewType) {
        return R.layout.item_counting_product;
    }

    @Override
    public void onBindViewHolder(CommonHolder holder, int position) {

        T item = getItem(position);
        holder.setText(R.id.tv_name, item.getTitle());
        holder.setText(R.id.tv_amount,item.getCount());
    }
}
